#include <iostream>
#include <string>
#include "tcp_server.h"
//#include "JsonMessageParsing/json_message_parsing.h"





int main() {

	//std::string jm = R"({
	//	"jsonID": "21",
	//	"jsonData": {
	//		"send_id": 2110551202,
	//		"receive_id": 2110551201,
	//		"time": "20231201T123502",
	//		"data": "hello-world",
	//		"status": 1
	//	}
	//})";
	//json_message_parsing jmp;
	//std::cout << jmp.DistributeServer(jm) << std::endl;
	tcp_server tcps;
	tcps.print_tcp_server_message();
	tcps.run();
	
	return 0;
}




//tcp_server tcps;
//std::thread tcp_thread(&tcp_server::run, &tcps);
//std::cout << "StackChat Tcp Server start..." << std::endl;
//tcps.print_tcp_server_message();
//
//
//std::string ip;
//std::cout << "ip:" << std::endl;
//std::cin >> ip;
//
//std::string port;
//std::cout << "port:" << std::endl;
//std::cin >> port;
//
//
//dbClient client(grpc::CreateChannel(ip + ":" + port, grpc::InsecureChannelCredentials()));
//
//std::cout << client.userSearchByID(2110551202) << std::endl;
//std::cout << client.userGetNameByID(2110551202) << std::endl;
//client.userUpdateNameByID(2110551202, "甘劲搏");
//std::cout << client.userGetNameByID(2110551202) << std::endl;
//std::cout << client.user_infoGetInfoByID(2110551202).info << std::endl;
//std::cout << client.message_logGetMessageByUserID(2110551202) << std::endl;
//std::cout << client.friend_tableGetFriendsByUserID(2110551202) << std::endl;
//std::cout << client.server_logGetLogByID(1).data << std::endl;
//client.userUpdateNameByID(2110551202, "甘劲博");
//
//
//
//while (1);
//
//
//
////tcp_thread.join();